package com.example.chapter06;

public class Applicator {
    public static void apply(Processor p, Object s) {
        System.out.println("Using Processor " + p.name());
        System.out.println(p.process(s));
    }
    public static void main(String[] args) {
        String s = "We are such stuff as dreams are made on";
        apply (new Upcase(), s);
        apply (new Downcase(), s);
        apply(new Splitter(), s);
    }
}
